package com.edgarli.web.controller.tool;

import com.edgarli.common.annotation.Log;
import com.edgarli.common.core.controller.BaseController;
import com.edgarli.common.core.domain.AjaxResult;
import com.edgarli.common.core.page.TableDataInfo;
import com.edgarli.common.enums.BusinessType;
import com.edgarli.common.utils.poi.ExcelUtil;
import com.edgarli.movies.domain.TMoviesConfig;
import com.edgarli.movies.service.ITMoviesConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author lixun
 * @Description 影视对外接口
 * @create 2023-11-24 11:36
 */
@RestController
@RequestMapping("/outMovies")
public class MoviesController extends BaseController {
    @Autowired
    private ITMoviesConfigService tMoviesConfigService;

    /**
     * 获取影音配置详细信息
     */
    @GetMapping(value = "/app")
    public AjaxResult app(String type, String appType) {
        return AjaxResult.success(tMoviesConfigService.queryByApp(type, appType));
    }

    /**
     * 获取所有app 的相关默认配置
     */
    @GetMapping(value = "/appAll")
    public AjaxResult appAll(String appType) {
        return AjaxResult.success(tMoviesConfigService.queryAllByApp(appType));
    }
}

